package com.geek.water.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.geek.water.entity.Role;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

public interface RoleMapper extends MPJBaseMapper<Role> {

    @Select("select r.* from user_role ur join role r on ur.role_id = r.id where ur.user_id = #{userId}")
    public Set<Role> selectRolesByUserId(Integer userId);

}
